package me.shiqiang.im.service;

import me.shiqiang.im.vo.Friend;
import me.shiqiang.im.vo.Group;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Collection;

/**
 * @author cuishiqiang
 * @date 2017/12/13 下午1:49
 */
@FeignClient(name = "im-http-service")
@RequestMapping("im/users")
public interface UserClient {

    @GetMapping("/{userId}/friends")
    Collection<Friend> getFriends(@PathVariable("userId") Long userId);

    @GetMapping("/{userId}/groups")
    Collection<Group> getGroups(@PathVariable("userId") Long userId);

    @GetMapping("/chatSwitch/{userId}/forBusiness")
    boolean chatSwitchForBusiness(@PathVariable("userId") Long userId);
}
